home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / OBJ1_2.ZIP;1 / C_ABROWS.TXT < prev    next >
Encoding:
Text File  |  1992-12-09  |  2.6 KB  |  66 lines

  1. '
  2. 'Class Description:
  3. '
  4. !short:ABrowse Class structure:
  5. Class ABrowse:
  6. ~~~~~~~~~~~~~~~
  7. It adopts the class Browse for editation of clipper arrray as a table.
  8.  
  9.  
  10. Common use:
  11. ~~~~~~~~~~~~~~~~~
  12. LOCAL OBJECT Ar OF ABrowse                        //-object is created
  13. AAdd(Ar:Arr,{"field1.1","field1.2","field1.3"}}   //we create
  14. AAdd(Ar:Arr,{"field1.2","field2.2","field2.3"}}   //a sample aray
  15. AAdd(Ar:Arr,{"field1.3","field3.2","field3.3"}}   //for editation
  16. Ar:Init()                                         //object is initialised
  17.  
  18. As all classes derived from class Task, this class doesn't need methods
  19. Process() and Done() to be run. The initialisation adds new object of
  20. this class on the top of stack of classes and following is job for
  21. task-swapper (method Process() of class Task)
  22.  
  23. Source text of class Abrowse is in the file C_ABrows.prg
  24.  
  25. !seealso: c_browse.ngo:Browse c_task.ngo:Task c_box.ngo:Box c_upabro.ngo:UpABrowse c_dbrows.ngo:DBrowse c_color.ngo:Color ob_class.ngo:"Class hierarchy"
  26.  
  27. !short:~~~~~~~~~~~~~~~~~~~~~~~~~
  28. !short:create class ABrowse from Browse
  29. !short:  export:
  30. !short:  var N     //1
  31. ^BABrowse:N^N: public: numeric
  32.   This instvar variable serves for array ABrowse:Arr in the same way as
  33.   clipper function RecNo() for any database i.e. as pointer of current
  34.   line in display table of this class. (Look at class Browse).
  35.  
  36. !short:  var Arr   //{}
  37. ^BABrowse:Arr^N: public: array
  38.   This is an array which represents table for view or editation.
  39.  
  40. !short:  method New=ABrowseNew    //o:New() --> self
  41. ^BABrowse:New()^N: public: return self
  42.   It fills the object with default initialising values.
  43.   Following predcessor variables are modified:
  44.  
  45.   ^UABrowse:CanSwap^N: override: private: logical
  46.     Default true value from inherited class Browse is overriden to
  47.     new default value false. It restricts switching from Browse to Form.
  48.  
  49.   ^UABrowse:InsBlock^N: override: private: code_block
  50.     Own method of new line input to table for array editation is defined.
  51.     This is because adding items to an array differs from adding records to
  52.     database.
  53.  
  54.   ^UABrowse:DelBlock^N: override: private: code_block
  55.     For array editation defines own method of deleting of table line.
  56.  
  57.  
  58. !short:  method Init=ABrowseInit  //o:Init(Name,R,C,Rs,Cs,Clr,Shd) --> true/false
  59. ^BABrowse:Init(Name,R,C,Rs,Cs,Clr,Shadow)^N: public: return true
  60.   Object is initialised, all parameters are not obligatory, when used are
  61.   transmitted to predcessor method Box:GoodInit(...). For exact parameter
  62.   description look at class ^Ubox^ method ^UGoodInit(...)^N.
  63.  
  64. !short:  endclass
  65.  
  66.